package cn.wolfcode.rbac.service.impl;

import cn.wolfcode.rbac.domain.Customer;
import cn.wolfcode.rbac.mapper.CustomerMapper;
import cn.wolfcode.rbac.qo.CustomerQueryObject;
import cn.wolfcode.rbac.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CustomerServiceImpl implements ICustomerService {
    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public List<Customer> selectAll() {
        return customerMapper.selectAllCustomer();
    }

    @Override
    public void deleteById(Long id) {
        customerMapper.deleteById(id);
    }

    @Override
    public Customer selectById(Long id) {
        return customerMapper.selectById(id);
    }

    @Override
    public void insertOne(Customer customer) {
        customerMapper.insertOne(customer);
    }

    @Override
    public void updateById(Customer customer) {
        customerMapper.updateById(customer);
    }

    @Override
    public List<Customer> selectList(CustomerQueryObject qo) {
        return customerMapper.selectList(qo);
    }
}
